<template>
  <div>
    <h3>首页</h3>
    <button @click="$router.go(-1)">后退</button>
    <button @click="$router.push('/movie/3/长津湖')">看长津湖</button>
    <button @click="zxy">听张学友</button>
  </div>
</template>

<script>
export default {
  methods: {
    zxy: {
      this.$router.push({
        name:'movie',
        params:{
          id:2,
          name:'长津湖'
        }
      })
    }
  }
}
</script>

<style scoped>
div {
  min-height: 200px;
  background-color: cornflowerblue;
}
</style>
